shopping_name = [("T-shit" ,100),
                 ("裤子" ,100),
                 ("鞋子" ,500),
                 ("帽子" ,100),
                 ("外套" ,200),
                 ("袜子" ,50),
                 ("手表" ,999)]

aipay = int(input("请输入支付宝金额："))
user_shopping_list = []
while True:
    print("-------☆商品☆-------")
    for item in shopping_name:
        print(shopping_name.index(item),item)
    user_chioce = input("请输入商品编号或者不想买了：")
    if user_chioce.isdigit():
        user_chioce = int(user_chioce)
        if 0 <= user_chioce < len(shopping_name):

            if aipay>shopping_name[user_chioce][1]:
                user_shopping_list.append(shopping_name[user_chioce])
                print("以为您添加该商品，您的余额还有%s" %(aipay-shopping_name[user_chioce][1]))
            else:
                print("您的余额不足，请充值！")
        else:
            print("商品不存在")
    elif user_chioce == "不想买了":
        print("购物清单")
        for item in user_shopping_list :
            print(item)
        print("余额：%s" % aipay)
        print("谢谢您的惠顾，欢迎您下次光临！")
        break
    else:
        print('请您输入正确的信息！')

